package com.daJiao.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.daJiao.domain.BaseEntity;
import com.daJiao.domain.CreateValidate;
import com.daJiao.domain.UpdateValidate;
import io.swagger.annotations.ApiModel;
import lombok.*;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Builder
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "sysHospital")
@TableName("sys_menu")
public class SysMenu extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 3275345625828742364L;

    /**
     * 菜单编码
     */
    private String menuCode;

    /**
     * 菜单名称
     */
    @NotEmpty(message = "菜单名称不能为空", groups = {CreateValidate.class})
    private String menuName;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 菜单url
     */
    @NotEmpty(message = "菜单url不能为空", groups = {CreateValidate.class, UpdateValidate.class})
    private String url;

    /**
     * 图标
     */
    @NotEmpty(message = "菜单图标不能为空", groups = {CreateValidate.class, UpdateValidate.class})
    private String icon;

    /**
     * 父菜单编号
     */
    @NotNull(message = "父id不能为空", groups = {CreateValidate.class, UpdateValidate.class})
    private Long pid;

    /**
     * 类型
     */
    @NotNull(message = "类型不能为空", groups = {CreateValidate.class, UpdateValidate.class})
    private Integer type;

    /**
     * 层级
     */
    private Integer level;

    /**
     * 是否有子节点
     */
    private Integer leaf;

    /**
     * 排序编号
     */
    @NotNull(message = "排序标识不能为空")
    private Integer number;

}